#ifndef unigame_Texture_h
#define unigame_Texture_h

#include "object/AutoRelease.h"
#include "config/Def.h"
#include <map>
#include <string>

namespace unigame
{
	enum ImageFormat
	{
		E_PNG_IF,
		E_TGA_IF,
		E_BMP_IF,
	};

	class File;
	class Texture: public AutoRelease
	{
	public:
		~Texture();

		static Texture* loadTexture(const char* name, int32u type, int32u format);

	private:
		Texture(File* file, int32u format);

	private:
		int32u m_width;
		int32u m_height;

		std::string m_name;
		char* m_data;

		static std::map<std::string, Texture*> s_loadedTextures;
	};
}

#endif